<template>
  <div>
    <h3>图片详细信息</h3>
    <h4>这里是图片缩略图和详细信息</h4>
    \(^o^)/~
    略略略
    <div class="simg">
      <img v-for="(item, index) in imgInfo" :key="index" :src="item.src" alt="">
    </div>
    <comment :newsId="this.id"></comment>
  </div>
</template>


<script>
import comment from '@/components/comment/comment'
export default {
  data(){
    return {
      id:this.$route.params.id,
      imgInfo:[]
    }
  },
  created(){
    this.getInfo()
  },
  methods: {
    getInfo(){
      this.$http.get('api/getthumimages/'+this.id).then(result=>{
        this.imgInfo=result.body.message
      })
    }
  },
  components: {
    comment
  }
}
</script>

<style scoped>
.simg {
  height: 100%;
}
.simg img {
  width: 130px;
  height: 130px;
  margin: 5px 5px;
}
</style>
